<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	request.setCharacterEncoding("utf-8");
	String cp = request.getContextPath();
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>파일올리기</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<link rel="stylesheet" href="<%=cp%>/data/css/style.css" type="text/css"/>

<link rel="stylesheet" href="http://code.jquery.com/ui/1.9.2/themes/base/jquery-ui.css" />    
<script src="http://code.jquery.com/jquery-1.8.3.js"></script>
<script src="http://code.jquery.com/ui/1.9.2/jquery-ui.js"></script>

<script language="javascript" type="text/javascript">

 // 달력 스크립트
		$(document)
			.ready(
					function() {

						//******************************************************************************
						// 상세검색 달력 스크립트
						//******************************************************************************
						var clareCalendar = {
							monthNamesShort : [ '1월', '2월', '3월', '4월', '5월',
									'6월', '7월', '8월', '9월', '10월', '11월', '12월' ],
							dayNamesMin : [ '일', '월', '화', '수', '목', '금', '토' ],
							weekHeader : 'Wk',
							dateFormat : 'yymmdd', //형식(20120303)
							autoSize : false, //오토리사이즈(body등 상위태그의 설정에 따른다)
							changeMonth : true, //월변경가능
							changeYear : true, //년변경가능
							showMonthAfterYear : true, //년 뒤에 월 표시
							buttonImageOnly : true, //이미지표시
							buttonText : '달력선택', //버튼 텍스트 표시
							buttonImage : '<%=cp%>/hotel/image/cal.jpg', //이미지주소
							showOn : "both", //엘리먼트와 이미지 동시 사용(both,button)
							yearRange : '1990:2020' //1990년부터 2020년까지
						};
						$("#checkin").datepicker(clareCalendar);
						$("#checkout").datepicker(clareCalendar);
						$("img.ui-datepicker-trigger")
								.attr("style",
										"margin-left:5px; vertical-align:middle; cursor:pointer;"); //이미지버튼 style적용
						$("#ui-datepicker-div").hide(); //자동으로 생성되는 div객체 숨김  
					});
 </script>

<script type="text/javascript">

	function sendIt(){
		
		f = document.myForm;
		
		if(f.mode.value == "hotelSave"){			
		
		f.action = "<%=cp%>/admin/hotelWrite.action";
		
		}else if (f.mode.value=="hotelUpdate") {
			f.action = "<%=cp%>/admin/hotelUpdate.action";	
		}
		f.submit();
		
	}

</script>
</head>
<body>

<div id="bbs">
	<div id="bbs_title">
	호텔 어드민
	</div>

<form action="" name="myForm" method="post" enctype="multipart/form-data">
	<div id="bbsCreated">
		<div class="bbsCreated_bottomLine">
			<dl>
				<dt>국가선택</dt>
				<dd>
				     <select name="hotelNationNo" >
				     <option value="1" <c:if test="${dto.hotelNationNo==1 }">selected </c:if>>일본</option>
				     <option value="2" <c:if test="${dto.hotelNationNo==2 }">selected </c:if>>중국</option>
				     <option value="3" <c:if test="${dto.hotelNationNo==3 }">selected </c:if>>아시아</option>
				     <option value="4" <c:if test="${dto.hotelNationNo==4 }">selected </c:if>>미주/캐나다</option>
				     <option value="5" <c:if test="${dto.hotelNationNo==5 }">selected </c:if>>유럽</option>
				     <option value="6" <c:if test="${dto.hotelNationNo==6 }">selected </c:if>>대양주</option>
				     </select>
				     
				</dd>
			</dl>
			<dl>
				<dt>호텔이름</dt>
				<dd>
				     <input type="text" name="hotelName" size="74" maxlength="100"  class="boxTF" value="${dto.hotelName }" />
				</dd>
			</dl>
			
			<dl>
				<dt>금&nbsp;&nbsp;&nbsp;&nbsp;액</dt>
				<dd>
				      <input type="text" name="roomAmount" value="${dto.roomAmount }" size="74" maxlength="100"  class="boxTF" />
				</dd>
			</dl>
			
			<dl>
				<dt>베드타입</dt>
				<dd>
				      <select name="bedType" >
				      <option value="1" <c:if test="${dto.bedType==1}"> selected </c:if>>싱글</option>
				      <option value="2" <c:if test="${dto.bedType==2}">selected </c:if>>더블</option>
				      <option value="3" <c:if test="${dto.bedType==3}">selected </c:if>>트리플</option>
				      <option value="4" <c:if test="${dto.bedType==4}">selected </c:if>>쿼드</option>
				      </select>
				</dd>
			</dl>
			<dl>
				<dt>최대인원선택</dt>
				<dd>
				      <select name="inwon" >
				      <option value="1" <c:if test="${dto.inwon==1}">selected </c:if>>1인</option>
				      <option value="2" <c:if test="${dto.inwon==2}">selected </c:if>>2인</option>
				      <option value="3" <c:if test="${dto.inwon==3}">selected </c:if>>3인</option>
				      <option value="4" <c:if test="${dto.inwon==4}">selected </c:if>>4인</option>
				      </select>
				</dd>
			</dl>
			<dl>
				<dt>조식가능여부</dt>
				<dd>
				     	<select name="breakfast">
				     	<option value="1" <c:if test="${dto.breakfast==1}"> selected </c:if>>No Breafast Servcie</option>
				     	<option value="2" <c:if test="${dto.breakfast==2}"> selected </c:if>>Breakfast Included</option>
				     	</select>
				</dd>
			</dl>
			
			<dl>
				<dt>호텔주소</dt>
				<dd>
				      <input type="text" name="hotelAdress" value="${dto.hotelAdress }" size="74" maxlength="100"  class="boxTF" />
				</dd>
			</dl>
			
			<dl>
				<dt>호텔전화번호</dt>
				<dd>
				      <input type="text" name="hotelTel" value="${dto.hotelTel }" size="74" maxlength="100"  class="boxTF" />
				</dd>
			</dl>
			
			<dl>
				<dt>호텔팩스번호</dt>
				<dd>
				      <input type="text" name="hotelFax" value="${dto.hotelFax }"size="74" maxlength="100"  class="boxTF" />
				</dd>
			</dl>
			
			<dl>
				<dt>호텔층수</dt>
				<dd>
				      <input type="text" name="floors" value="${dto.floors }" size="74" maxlength="100"  class="boxTF" />
				</dd>
			</dl>
			
			<dl>
				<dt>총객실수</dt>
				<dd>
				      <input type="text" name="countRoom" value="${dto.countRoom }" size="74" maxlength="100"  class="boxTF" />
				</dd>
			</dl>
			
			<dl>
				<dt>호텔위치</dt>
				<dd>
					<textarea name="hotelLocation" rows="10" cols="50">${dto.hotelLocation }</textarea>
				</dd>
			</dl>
			
			<dl>
				<dt>호텔소개 </dt>
				<dd>
					<textarea name="hotelIntroduce" rows="10" cols="50">${dto.hotelIntroduce }</textarea>
				</dd>
			</dl>
			
			<dl>
				<dt>교통정보</dt>
				<dd>
				
					<textarea name="trafficReport" rows="10" cols="50">${dto.trafficReport}</textarea>
				</dd>
			</dl>
			
			<dl>
				<dt>부대시설</dt>
				<dd>
					<textarea name="facility" rows="10" cols="50">${dto.facility }</textarea>
				</dd>
			</dl>
			
			<dl>
				<dt>객실시설</dt>
				<dd>
				
				<textarea name="roomFacility" rows="10" cols="50">${dto.roomFacility }</textarea>
				</dd>
			</dl>
			
			<dl>
				<dt>숙박시작기간</dt>
				<dd>
				      <input name="checkin" type="text" id="checkin" size="15" maxlength="8" value="${dto.checkin }" title="시작일자" />
				</dd>
			</dl>
			
			<dl>
				<dt>숙박종료기간</dt>
				<dd>
					<input name="checkout" type="text" value="${dto.checkout }" id="checkout" size="15" maxlength="8" title="종료일자" />
				</dd>
			</dl>
		</div>
			<div class="bbsCreated_bottomLine">

			<dl>
				<dt>파&nbsp;&nbsp;&nbsp;&nbsp;일</dt>
				<dd >
				     <input type="file" name="upload" size="58"/>
				     
				</dd>
			</dl>			
		</div>
	

	</div>

	<div id="bbsCreated_footer">
		<input type="hidden" name="mode" value="${mode}"/>
		<input type="hidden" name="hotelNum" value="${dto.hotelNum}"/>
		
        <input type="button" value=" 등록하기 " class="btn1" onclick="sendIt();"/>
        <input type="reset" value=" 다시입력 " class="btn1" onclick="document.myForm.nation.focus();"/>
        <input type="button" value=" 작성취소 " class="btn1" 
        onclick="javascript:location.href='<%=cp%>/admin/list.action'"/>
        
	</div>

    </form>
</div>

</body>

</html>